- Working in different contexts: RStudio Projects
- Dynamic document generation: RMarkdown
- Version control: Git + GitHub
- Package management: renv
- Containerization: Docker
- Where should I start?
- Start collaborating
13/01/2021
knitr (Xie, 2015, 2020) and tinytex (Xie, 2015, 2020; for pdfs)install.packages("rmarkdown")install.packages("rmarkdown")install.packages("rmarkdown")
install.packages() to install packages in this local libraryrenv.lock fileinstall.packages(renv)renv::init()renv::snapshot()renv::restore()renv::init()renv.lock fileinstall.packages("cowsay")
cowsay::say("Hello world", "cow")
renv::snapshot()Restoring someone else’s package versions:
projectname.Rproj file)renv::restore() to install the package versions from the renv.lock fileN:/).Rmd files) on this virtual systemDockerfile that can be shared via GitHubdocker run -d -e PASSWORD=1234 -p 8787:8787 -v /path/to/your/project:/home/rstudio/ rocker/rstudio
Dockerfile in your project directy, specyfing additional steps to execute when building the container, e.g., install.packages("renv"); renv::restore()